{smcl}
{* *! version 0.4 22-Apr-2020}{...}
{viewerjumpto "Title" "rdmc##title"}{...}
{viewerjumpto "Syntax" "rdmc##syntax"}{...}
{viewerjumpto "Description" "rdmc##description"}{...}
{viewerjumpto "Options" "rdmc##options"}{...}
{viewerjumpto "Examples" "rdmc##examples"}{...}
{viewerjumpto "Stored results" "rdmc##stored_results"}{...}
{viewerjumpto "References" "rdmc##references"}{...}
{viewerjumpto "Authors" "rdmc##authors"}{...}
{viewerjumpto "Also see" "rdmc##alsosee"}{...}
{cmd:help rdmc}{right: ({browse "https://doi.org/10.1177/1536867X20976320":SJ20-4: st0620})}
{hline}

{marker title}{...}
{title:Title}

{p2colset 5 13 15 2}{...}
{p2col:{cmd:rdmc} {hline 2}}Analysis of regression-discontinuity designs with multiple cutoffs{p_end}


{marker syntax}{...}
{title:Syntax}

{p 8 12 2}
{cmd:rdmc} {it:depvar} {it:runvar} {ifin}{cmd:,}
{cmd:{opt c:var}(}{it:cutoff_var}{cmd:)} 
[{cmd:fuzzy(}{it:string}{cmd:)} 
{cmd:{opt deriv:var}(}{it:string}{cmd:)} 
{cmd:pooled_opt(}{it:string}{cmd:)} 
{cmd:verbose}
{cmd:{opt p:var}(}{it:string}{cmd:)} 
{cmd:{opt q:var}(}{it:string}{cmd:)} 
{cmd:{opt h:var}(}{it:string}{cmd:)} 
{cmd:{opt hr:ightvar}(}{it:string}{cmd:)} 
{cmd:{opt b:var}(}{it:string}{cmd:)} 
{cmd:{opt br:ightvar}(}{it:string}{cmd:)} 
{cmd:{opt rho:var}(}{it:string}{cmd:)} 
{cmd:{opt covs:var}(}{it:string}{cmd:)} 
{cmd:{opt covsdrop:var}(}{it:string}{cmd:)} 
{cmd:{opt kernel:var}(}{it:string}{cmd:)} 
{cmd:{opt weights:var}(}{it:string}{cmd:)} 
{cmd:{opt bwselect:var}(}{it:string}{cmd:)} 
{cmd:{opt scalepar:var}(}{it:string}{cmd:)} 
{cmd:{opt scaleregul:var}(}{it:string}{cmd:)} 
{cmd:{opt masspoints:var}(}{it:string}{cmd:)} 
{cmd:{opt bwcheck:var}(}{it:string}{cmd:)} 
{cmd:{opt bwrestrict:var}(}{it:string}{cmd:)} 
{cmd:{opt stdvars:var}(}{it:string}{cmd:)} 
{cmd:{opt vce:var}(}{it:string}{cmd:)} 
{opt level(#)}
{cmd:plot}
{cmd:graph_opt(}{it:string}{cmd:)}]{p_end}

{pstd}
{it:depvar} is the dependent variable.
{it:runvar} is the running variable (also known as score or forcing
variable).


{marker description}{...}
{title:Description}

{pstd}
{cmd:rdmc} provides tools to analyze regression-discontinuity (RD) designs
with multiple cutoffs.  For methodological background, see Keele and Titiunik
(2015) and Cattaneo et al. (2016, 2020).  It also computes alternative
estimation and inference procedures available in the literature.

{pmore}
Companion commands are {helpb rdmcplot} for multicutoff RD plots and
{helpb rdms} for multiscore RD estimation and inference.{p_end}

{pmore}
A detailed introduction to this command is given in Cattaneo, Titiunik, and
Vazquez-Bare (2020).

{pmore}
Companion {browse "www.r-project.org":R} functions are also available
{browse "https://rdpackages.github.io":here}.{p_end}

{pmore}
This command uses the Stata (and R) package {helpb rdrobust} for underlying
calculations.  See Calonico, Cattaneo, and Titiunik (2014, 2015) and Calonico
et al. (2017) for more details.{p_end}

{pstd}
Related Stata and R packages useful for inference in RD designs are described
in the following website:{p_end}

{pmore}
{browse "https://rdpackages.github.io"}


{marker options}{...}
{title:Options}

{dlgtab:Estimand}

{phang}
{cmd:cvar(}{it:cutoff_var}{cmd:)} specifies the numeric variable
{it:cutoff_var}, which indicates the cutoff faced by each unit in the sample.
{cmd:cvar()} is required.

{phang}
{cmd:fuzzy(}{it:string}{cmd:)} indicates a fuzzy design.  See {helpb rdrobust}
for details.{p_end}

{phang}
{cmd:derivvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the order of the derivative for
{cmd:rdrobust} to calculate cutoff-specific estimates.  See {helpb rdrobust}
for details.{p_end}

{dlgtab:rdrobust options}

{phang}
{cmd:pooled_opt(}{it:string}{cmd:)} specifies the options to be passed to
{cmd:rdrobust} to calculate pooled estimates.  See {helpb rdrobust} for
details.{p_end}

{phang}
{cmd:verbose} displays the output from {cmd:rdrobust} to calculate
pooled estimand.{p_end}

{dlgtab:Local polynomial regression}

{phang}
{cmd:pvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the order of the polynomials for
{cmd:rdrobust} to calculate cutoff-specific estimates.  See {helpb rdrobust}
for details.{p_end}

{phang}
{cmd:qvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the order of the polynomials for
bias estimation for {cmd:rdrobust} to calculate cutoff-specific estimates.
See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:hvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the bandwidths for {cmd:rdrobust}
to calculate cutoff-specific estimates.  When {cmd:hrightvar()} is specified,
{cmd:hvar()} indicates the bandwidth to the left of the cutoff.  When
{cmd:hrightvar()} is not specified, the same bandwidths are used at each side.
See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:hrightvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the bandwidths to the right of the
cutoff for {cmd:rdrobust} to calculate cutoff-specific estimates.  When
{cmd:hrightvar()} is not specified, the same bandwidths in {cmd:hvar()} are
used at each side.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:bvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the bandwidths for bias estimation
for {cmd:rdrobust} to calculate cutoff-specific estimates.  When
{cmd:brightvar()} is specified, {cmd:bvar()} indicates the bandwidth to the
left of the cutoff.  When {cmd:brightvar()} is not specified, the same
bandwidths are used at each side.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:brightvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the bandwidths for bias estimation
to the right of the cutoff for {cmd:rdrobust} to calculate cutoff-specific
estimates.  When {cmd:brightvar()} is not specified, the same bandwidths in
{cmd:bvar()} are used at each side.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:rhovar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the value of rho for {cmd:rdrobust}
to calculate cutoff-specific estimates.  See {helpb rdrobust} for
details.{p_end}

{phang}
{cmd:covsvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the covariates for {cmd:rdrobust}
to calculate cutoff-specific estimates.  See {helpb rdrobust} for
details.{p_end}

{phang}
{cmd:covsdropvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies whether collinear covariates
should be dropped.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:kernelvar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the kernels for {cmd:rdrobust} to
calculate cutoff-specific estimates.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:weightsvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies the weights for {cmd:rdrobust}
to calculate cutoff-specific estimates.  See {helpb rdrobust} for
details.{p_end}

{dlgtab:Bandwidth selection}

{phang}
{cmd:bwselectvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies the bandwidth selection method
for {cmd:rdrobust} to calculate cutoff-specific estimates.  See
{helpb rdrobust} for details.{p_end}

{phang}
{cmd:scaleparvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies the value of
{cmd:scaleparvar()} for {cmd:rdrobust} to calculate cutoff-specific estimates.
See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:scaleregulvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies the value of
{cmd:scaleregulvar()} for {cmd:rdrobust} to calculate cutoff-specific
estimates.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:masspointsvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies how to handle repeated values
in the running variable.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:bwcheckvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies the value of
{cmd:bwcheckvar()}.  See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:bwrestrictvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies whether computed bandwidths are
restricted to the range of {it:runvar}.  See {helpb rdrobust} for
details.{p_end}

{phang}
{cmd:stdvarsvar(}{it:string}{cmd:)} specifies a variable of length equal to
the number of different cutoffs that specifies whether {it:depvar} and
{it:runvar} are standardized.  See {helpb rdrobust} for details.{p_end}

{dlgtab:Variance-covariance estimation}

{phang}
{cmd:vcevar(}{it:string}{cmd:)} specifies a variable of length equal to the
number of different cutoffs that specifies the variance-covariance matrix
estimation method for {cmd:rdrobust} to calculate cutoff-specific estimates.
See {helpb rdrobust} for details.{p_end}

{phang}
{cmd:level(}{it:#}{cmd:)} specifies the confidence level for confidence
intervals.  See {helpb rdrobust} for details.{p_end}

{dlgtab:Plot}

{phang}
{cmd:plot} plots the pooled and cutoff-specific estimates and the weights
given by the pooled estimate to each cutoff-specific estimate.

{phang}
{cmd:graph_opt(}{it:string}{cmd:)} specifies options to be passed to the graph
when {cmd:plot} is specified.{p_end}


{marker examples}{...}
{title:Examples}

{pstd}Standard use of {cmd:rdmc}{p_end}
{phang2}{cmd:. rdmc yvar xvar, cvar(cvar)}{p_end}

{pstd}{cmd:rdmc} with plots of estimates and weights{p_end}
{phang2}{cmd:. rdmc yvar xvar, cvar(cvar) plot}{p_end}

{pstd}{cmd:rdmc} showing output from {cmd:rdrobust} and specifying uniform
kernel{p_end}
{phang2}{cmd:. rdmc yvar xvar, cvar(cvar) verbose pooled_opt(kernel(uniform))}
{p_end}


{marker stored_results}{...}
{title:Stored results}

{pstd}
{cmd:rdmc} stores the following in {cmd:e()}:

{synoptset 20 tabbed}{...}
{p2col 5 20 24 2: Scalars}{p_end}
{synopt:{cmd:e(tau_weight)}}weighted estimate{p_end}
{synopt:{cmd:e(se_weight_rb)}}robust bias-corrected standard error for weighted estimate{p_end}
{synopt:{cmd:e(pv_weight_rb)}}robust bias-corrected p-value for weighted estimate{p_end}
{synopt:{cmd:e(ci_weight_l)}}left limit of robust bias-corrected confidence interval for weighted estimate{p_end}
{synopt:{cmd:e(ci_weight_r)}}right limit of robust bias-corrected confidence interval for weighted estimate{p_end}
{synopt:{cmd:e(N_h_l)}}effective sample size to the left of the cutoff used to estimate weighted estimand{p_end}
{synopt:{cmd:e(N_h_r)}}effective sample size to the right of the cutoff used to estimate weighted estimand{p_end}
{synopt:{cmd:e(tau_pool)}}pooled estimate{p_end}
{synopt:{cmd:e(se_rb)}}robust bias-corrected standard error for pooled estimate{p_end}
{synopt:{cmd:e(pv_rb)}}robust bias-corrected p-value{p_end}
{synopt:{cmd:e(ci_rb_l)}}left limit of robust bias-corrected confidence interval{p_end}
{synopt:{cmd:e(ci_rb_r)}}right limit of robust bias-corrected confidence interval{p_end}
{synopt:{cmd:e(h_l)}}bandwidth to the left of the cutoff used to estimate pooled estimand{p_end}
{synopt:{cmd:e(h_r)}}bandwidth to the right of the cutoff used to estimate pooled estimand{p_end}
{synopt:{cmd:e(N_h_l)}}sample size within bandwidth to the left of the cutoff used to estimate pooled estimand{p_end}
{synopt:{cmd:e(N_h_r)}}sample size within bandwidth to the right of the cutoff used to estimate pooled estimand{p_end}

{p2col 5 20 24 2: Matrices}{p_end}
{synopt:{cmd:e(b)}}bias-corrected coefficient vector{p_end}
{synopt:{cmd:e(V)}}robust variance-covariance matrix of the estimators{p_end}
{synopt:{cmd:e(coefs)}}conventional coefficient vector{p_end}
{synopt:{cmd:e(pv_rb)}}robust p-value vector{p_end}
{synopt:{cmd:e(CI_rb)}}bias-corrected confidence intervals{p_end}
{synopt:{cmd:e(H)}}vector of bandwidths at each side of each cutoff{p_end}
{synopt:{cmd:e(weights)}}vector of weights for each cutoff-specific estimate{p_end}
{synopt:{cmd:e(sampsis)}}vector of sample sizes at each side of each cutoff{p_end}


{marker references}{...}
{title:References}

{phang}
Calonico, S., M. D. Cattaneo, M. H. Farrell, and R. Titiunik. 2017.
rdrobust: Software for regression-discontinuity designs.
{it:Stata Journal} 17: 372-404.
{browse "https://doi.org/10.1177/1536867X1701700208"}.

{phang}
Calonico, S., M. D. Cattaneo, and R. Titiunik. 2014.
Robust data-driven inference in the regression-discontinuity design.
{it:Stata Journal} 14: 909-946.
{browse "https://doi.org/10.1177/1536867X1401400413"}.

{phang}
------. 2015.
rdrobust: An R package for robust nonparametric inference in
regression-discontinuity designs.
{it:R Journal} 7: 38-51.
{browse "https://doi.org/10.32614/RJ-2015-004"}.

{phang}
Cattaneo, M. D., L. Keele, R. Titiunik, and G. Vazquez-Bare. 2016.
Interpreting regression discontinuity designs with multiple cutoffs.
{it:Journal of Politics} 78: 1229-1248.
{browse "https://doi.org/10.1086/686802"}.

{phang}
------. 2020.
Extrapolating treatment effects in multi-cutoff regression discontinuity
designs.
{browse "https://cattaneo.princeton.edu/papers/Cattaneo-Keele-Titiunik-VazquezBare_2021_JASA.pdf"}.

{phang}
Cattaneo, M. D., R. Titiunik, and G. Vazquez-Bare. 2020.
Analysis of regression-discontinuity designs with multiple cutoffs or multiple
scores.
{it:Stata Journal} 20: 866-891.
{browse "https://doi.org/10.1177/1536867X20976320"}.

{phang}
Keele, L. J., and R. Titiunik. 2015.
Geographic boundaries as regression discontinuities.
{it:Political Analysis} 23: 127-155.
{browse "https://doi.org/10.1093/pan/mpu014"}.


{marker authors}{...}
{title:Authors}

{pstd}
Matias D. Cattaneo{break}
Princeton University{break}
Princeton, NJ{break}
{browse "mailto:cattaneo@princeton.edu":cattaneo@princeton.edu}{p_end}

{pstd}
Roc{c i'}o Titiunik{break}
Princeton University{break}
Princeton, NJ{break}
{browse "mailto:titiunik@princeton.edu":titiunik@princeton.edu}{p_end}

{pstd}
Gonzalo Vazquez-Bare{break}
University of California, Santa Barbara{break}
Santa Barbara, CA{break}
{browse "mailto:gvazquez@econ.ucsb.edu":gvazquez@econ.ucsb.edu}{p_end}


{marker alsosee}{...}
{title:Also see}

{p 4 14 2}
Article:  {it:Stata Journal}, volume 20, number 4: {browse "https://doi.org/10.1177/1536867X20976320":st0620}{p_end}
